package 学生选课;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        Teacher teacher1 = new Teacher("赵老师",001,"男");
        Teacher teacher2 = new Teacher("白老师",002,"女");

        Course course1 = teacher1.addCourse(1,"C语言","A111","8:00");
        Course course2 = teacher1.addCourse(2,"JAVA","A222","10:00");

        Course course3 = teacher2.addCourse(3,"HTML","A111","14:00");

        Student student1 = new Student("李华",20201001,"男");
        Student student2 = new Student("张二",20201002,"女");

        student1.selectCourse(course1);
        student1.selectCourse(course2);

        List<Course> courseList1 = student1.getCourseList();
        System.out.println("学生1【选课】【课程1和课程2】课程信息:");
        for (int i = 0; i < courseList1.size(); i++) {
            System.out.println(courseList1.get(i).getClassname());
        }

        student1.unSelectCourse(course1);
        System.out.println("学生1【退课】【课程1】后课程信息:");
        for (int i = 0; i < courseList1.size(); i++) {
            System.out.println(courseList1.get(i).getClassname());
        }

    }
}
